package happy.study.clique.module.study.demo1.code;

/**
 * @author fsq
 * @date 2021/11/3 16:31
 **/
public abstract class AbstractLimitValidator {

    static boolean hasMatching(int mask, LimitMode mode) {
        return match(mask, mode.getMask());
    }

    private static boolean match(int source, int target) {
        return (source & target) == target;
    }
}
